package file_package;

import java.io.*;

public class FileChaning {
	public static void main(String[] args) {
		File f = new File("E:/Test.txt");
		try {
			FileWriter fw = new FileWriter(f);
			BufferedWriter br = new BufferedWriter(fw);
			br.write("Hi jamil,");
			br.newLine();
			br.write("How are you.");
			br.newLine();
			br.write("Thanks & Regards");
			br.newLine();
			br.write("Jamil");
			br.flush();
			br.close();
			
			FileReader fr =new FileReader(f);
			BufferedReader brd = new BufferedReader(fr);
			String s;
			while( (s = brd.readLine()) != null)
			System.out.println(s);
		
		} catch (IOException e) {
			e.printStackTrace();
		}

	}

}
